package exam.test15;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2020-12-12
 * Time: 11:05
 */
public class Player {
    private String name;
    private String event;
    private double latestScore;
    private double payment;
    private static double factor = 1000;

    public Player(String myName, String myEvent, double pay) {
        name = myName;
        event = myEvent;
        latestScore = 0.0;
        payment = pay;
    }

    public Player() {
        name = null;
        event = null;
        latestScore = 0.0;
        payment = 0.0;
    }

    public String getName() {
        return name;
    }

    public String getEvent() {
        return event;
    }

    public double getLatestScore() {
        return latestScore;
    }

    public void recentScore(double score) {
        latestScore = score;
    }

    public double getPayment() {
        return payment;
    }

    public void setPayement() {
        payment = payment * (1 + latestScore / factor);
    }

    public double predictScore() {
        return latestScore;
    }
}